<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let money = 100
    while (true) {
      let re = prompt(`
      请输入你的操作：
      1.存钱
      2.取钱
      3.查看余额
      4.退出
      `)
      if (re === '4') break
      switch (re) {
        case '1':
          let count = +prompt('请输入存款金额：')
          money += count
          break
        case '2':
          let num = +prompt('请输入取款金额：')
          money -= num
          break
        case '3':
          alert(`你的存款为${money}`)
          break

      }
    }
  </script>
</body>

</html>